__author__ = 'Administrator'

try:
    for line in open("myfile.txt"):
        print(line, end="")
except Exception as e:
    print(e)

try:
    with open("myfile.txt") as f:
        for line in f:
            print(line, end="")
except Exception as e:
    print(e)
